﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RepManager : MonoBehaviour
{
    [SerializeField]
    private int reputation = 0;
    [SerializeField]
    private int lawfullness = 0;

    private string alignment;
    public int MyReputation { get => reputation; set => reputation = value; }
    public int MyLawfullness { get => lawfullness; set => lawfullness = value; }
    public string MyAlignment { get => alignment; set => alignment = value; }
    //dialog phrase opener via dictionary?
    private void Start()
    {
        
    }

    public string Alignment(int rep, int law)
    {
        string lawful=null;
        string reputable = null;
        if (rep > 200)
        {
            reputable = "Good";
        }else if (rep > 2)
        {
            reputable = "Moral";
        }else if (rep > -2)
        {
            reputable = "Neutral";
        }
        else if (rep > -200)
        {
            reputable = "Impure";
        }
        else if (rep < -200)
        {
            reputable = "Evil";
        }


        if (law > 200)
        {
            lawful = "Lawful";
        }
        else if (law > 2)
        {
            lawful = "Social";
        }
        else if (law > -2)
        {
            lawful = "Neutral";
        }
        else if (law > -200)
        {
            lawful = "Rebel";
        }
        else if (law < -200)
        {
            lawful = "Chaotic";
        }
        return (lawful + " " + reputable);
    }
}
